//
//  UserCenterViewModel.h
//  Jyxt
//
//  Created by 刘日 on 17/5/25.
//  Copyright © 2017年 DaLian Rental Housing Management. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface UserCenterViewModel : NSObject

/**
 绑定登录表单的认证和登录表单的时间

 @param numberField 账号输入框
 @param passwordField 密码输入框
 @param signInButton 登录按钮
 */
+ (void)bindSignInCheckWithNumberField: (UITextField *)numberField
                         passwordField: (UITextField *)passwordField
                          signInButton: (UIButton *)signInButton;

/**
 与服务器进行登录交互操作

 @param number 账号
 @param password 密码
 @param success 成功的回调
 @param failed 失败的回调
 */
+ (void)signInWithNumber: (NSString *)number password: (NSString *)password success: (void (^)()) success failed: (void (^)(NSString *reason))failed;

/**
 判断当前是否已经登录了

 @return 是否已经登录的Bool值
 */
+ (BOOL)isHaveSignIn;

/**
 跳转到主界面
 */
+ (void)gotoMain;

/**
 获取本地已经保存的UToken

 @return UToken字符串
 */
+ (NSString *)getLocalUToken;

/**
 注销
 */
+ (void)signOut;

@end
